﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApplication7.Models;

namespace WebApplication7.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            shapes tri = new triangle() { triBase = 10, height = 3 };
            return View(tri);
        }

        public ActionResult About()
        {
            
            shapes rect = new rectangle() { Name = "rectangle", length = 5, width = 2 };

            return View(rect);
        }

        public ActionResult Contact()
        {
            shapes squ = new square() { Name = "square", side = 5 };

            return View(squ);
        }

        public ActionResult Test()
        {
            x.square = new square() { Name = "Square" side = 4 };
            

            return View(x);
           
        }public ActionResult ShapeList()
        {
            List<shapes> shapeList = new List<shapes>
            {
                tri, rect, squ

            };
            return View(shapeList);
        }

    }
}